package com.ayoka.parenting.bean;

import java.io.Serializable;
import java.util.List;

/**
 * @ProjectName: AyokaClient.
 * @ClassName: ClassroomBean.
 * @Description: .
 * @Author: jincp.
 * @CreateDate: 2019/11/4 15:31.
 */

public class ClassroomBean implements Serializable{


    /**
     * ID : 8
     * Title : 三胖的问题
     * StartDate : 2019-11-04 00:00:00
     * Weeks : [1,2,3,4,5,6,7]
     * Hour : 16
     * Min : 0
     * CoachUid : 23
     * Coach : {"ID":23,"WeixinNickName":"前途无量","Sex":0,"SubscribeStatus":0,"LocalAvatar":"https://cdn.ayoka.cn/upload/user_avatar/201907/6c3e8f51-6d47-40f4-877e-5054e7dc86c7.jpg","Status":0,"CreateDate":"0001-01-01 00:00:00"}
     * MemberCount : 0
     * Status : 0
     * IsPublic : 0
     * IsOnTrial : 1
     * MeditationID : 0
     * CreateDate : 0001-01-01 00:00:00
     */

    public String ID;
    public String Title;
    public String Descp;
    public String StartDate;
    public int Hour;
    public int Min;
    public String CoachUid;
    public BasicUserInfoBean Coach;
    public LecturerInfoBean LecturerInfo;
    public int MemberCount;
    public int Status;
    public int IsPublic;
    public int IsOnTrial;
    public String MeditationID;
    public String CreateDate;
    public List<Integer> Weeks;

    public String getStartNode() {
        StringBuilder stringBuilder = new StringBuilder();
        for (Integer week : Weeks) {
            if (stringBuilder.length() != 0){
                stringBuilder.append(",");
            }
            stringBuilder.append(getWeekString(week));
        }
        return stringBuilder.toString();
    }

    private String getWeekString(Integer week) {
        switch (week) {
            case 1:
                return "周一";
            case 2:
                return "周二";
            case 3:
                return "周三";
            case 4:
                return "周四";
            case 5:
                return "周五";
            case 6:
                return "周六";
            case 7:
                return "周日";
            default:
                return "";
        }
    }
}
